package com.atguigu.ucenterservice.service;

import com.atguigu.commonutils.R;
import com.atguigu.ucenterservice.entity.UcenterMember;
import com.atguigu.ucenterservice.entity.vo.RegisterVo;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.HashMap;

/**
 * <p>
 * 会员表 服务类
 * </p>
 *
 * @author 陈烨庆
 * @since 2022-04-06
 */
public interface UcenterMemberService extends IService<UcenterMember> {

    String login(UcenterMember ucenterMember);

    R register(RegisterVo registerVo);

    UcenterMember getMemberByOpenId(String openid);

    /**
     * 拿着 access_token 和 openid 的值再去请求微信提供的固定地址
     * 访问微信的资源服务器，获取用户信息
     * @param openId
     * @param accessToken
     * @return
     */
    HashMap getUserInfo(String openId, String accessToken);
}
